{extend name="base:base" /}
{block name="body"}




<!--head end-->
<link href="__THEME__/css/inner.css" rel="stylesheet" type="text/css">

<div class="bread">
    <div class="bread_text wrap">
        <span>当前位置：<a href="javascript:;">首页</a>

            <?php
            $bread = help_breadcrumb_article($cid);
            foreach ($bread as $key => $value) {
                ?>
                <span>&gt;</span> <a href="<?php echo my_url('index/index/lists_article?id=' . $key); ?>"><?php echo $value; ?></a>
            <?php } ?>


    </div>
</div>
<!--inner start -->
<div class="inner wrap clearfix">

    <aside class="left">
        <div class="navbox">
            <div class="nav-title">
                <h2>新闻中心</h2>
                <span class="icon_dot"></span>
            </div>
            <div class="nav-con">


                <?php
                $path = db('article_cat')->where('id', $cid)->value('path');
                $category = db('article_cat')->where('path', 'LIKE', '' . $path . '%')->where('id', '<>', $cid)->select();
                // 转多维
                $category = node_merge($category, null, $cid);
                foreach ($category as $key => $value) {
                    ?>
                    <dl>
                        <dt class="selected"><span class="common-img flex minus"></span><a href="<?php echo my_url('index/index/lists_article?id=' . $value['id']) ?>"><?php echo $value['title'] ?></a> </dt>
                        <div class="su_leftmenu">
                            <?php
                            foreach ($value['child'] as $key2 => $value2) {
                                ?>
                                <dd <?php
                                if (request()->get('id') == $value2['id']) {
                                    echo 'class="left_navactive"';
                                }
                                ?>>
                                    <a href="<?php echo my_url('index/index/lists_article?id=' . $value2['id']) ?>"><?php echo $value2['title'] ?></a>
                                </dd>
                            <?php } ?>
                        </div>
                    </dl>
                <?php } ?>



            </div>
        </div>
    </aside>


    <div class="right">
        <div class="title"><h1><?php echo $category_name; ?></h1>
        </div>
        <div class="content clearfix">
            <article class="news-article">
                <header>
                    <h3 class="title">  <?php echo $title; ?></h3>
                    <ul class="date">
                        <li>点击数：<?php echo $hits; ?></li>
                        <li>发布时间：<?php echo date('Y-m-d', $create_time); ?> </li>
                        <div class="clear"></div>
                    </ul>
                </header>
                <div class="news-content clearfix">
                    <?php echo $content; ?>
                </div>
                <footer class="prenext">
                    <ul>


                        <?php if (isset($prev['id'])) { ?>
                            <li>   上一篇：<a href="<?php echo url('/xinwen/' . $prev['id']) ?>"><?php echo $prev['title'] ?></a>  </li>
                        <?php } ?>

                        <?php if (isset($next['id'])) { ?>
                            <li> 下一篇：<a href="<?php echo url('/xinwen/' . $next['id']) ?>"><?php echo $next['title'] ?></a></li>
                        <?php } ?>

                    </ul>
                </footer>
            </article>
        </div><!--  content  结束 -->
    </div>
</div><!--inner 结束-->






{/block}

{block name="foot_js"}
<script src="<?php echo my_url('index/index/hits_article?id=' . $id); ?>" type="text/javascript" language="javascript"></script>
{/block}